import requests,json
import pandas as pd
xing_key = "09f941d0953f18dc75c9742d60200a79"

def apiweather(key,location,extensions = "base",output = "json"):
    # 天气查询
    url='https://restapi.amap.com/v3/weather/weatherInfo?parameters'
    params={
        'key':xing_key,
        'location':location
    }
    response = requests.get(url,params=params)
    results = response.json()
    return results